package com.luoyuanxiangvip.admin.controller;


import com.luoyuanxiangvip.admin.controller.support.BaseController;
import com.luoyuanxiangvip.core.entity.BizTag;
import com.luoyuanxiangvip.core.service.IBizTagService;
import com.luoyuanxiangvip.common.utils.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luoyuanxiang <p>luoyuanxiangvip.com</p>
 * @since 2019-05-26
 */
@RestController
@RequestMapping("/admin/tags")
@RequiresAuthentication
@Api(description = "标签管理")
public class BizTagController extends BaseController<IBizTagService, BizTag, Long> {

    @ApiOperation(value = "标签条数查询")
    @GetMapping("/tagCount")
    public AjaxResult tagCount() {
        int count = getiService().count();
        return AjaxResult.success("标签条数查询成功", count);
    }
}
